package com.cloudcross.ssp.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


import com.cloudcross.ssp.base.service.IGenericService;
import com.cloudcross.ssp.common.utils.Pager;
import com.cloudcross.ssp.model.Log;

import javax.servlet.http.HttpServletRequest;

public interface ILogService extends IGenericService<Log> {
    /**
     * @param paramMap 搜索条件
     * @param module   对应模块条件
     * @return
     */
    int countByParams(Map<String, Object> paramMap, String module);

    /**
     * @param paramMap
     * @param pager    页数
     * @param module   对应模块条件
     * @return
     */
    List<Log> findByParams(Map<String, Object> paramMap, Pager pager, String module);

    //导出Excel用
    List<Log> findDeliverEffectAnalysis(Map<String, Object> paramMap);

    List<Log> findByParams1(HashMap<String, Object> paramMap);

    int countByParamsBack(Map<String, Object> paramMap);

    List<Log> findByParamsBack(Map<String, Object> paramMap, Pager pager);

    List<Log> findByParamsBack(Map<String, Object> paramMap);

    Integer findLogCountByCondition(Map<String, Object> condition);

    List<Log> findLogByCondition(Map<String, Object> condition, Pager pager);

    /**
     * 封装日志操作记录
     * @param module    模块
     * @param tableName 表名
     * @param recordId  记录id
     * @param action    操作详情
     * @param action    操作类型
     *
     * @return
     */
    void saveLogAction(HttpServletRequest request,String module, String tableName, Long recordId, String action, String actionType);
}
